<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        //1.把数字转换成字符串型,变量toString()
        var num1 = 1;
        var num2 = 2;
        var num3 = 3;
        var str = num1.toString();
        console.log(typeof str);
        //2.利用String()
        console.log(String(num2));
        //3.利用字符串拼接 隐式转换
        console.log(num3+'');

    </script>
</head>
<body>

</body>
</html>